<?php
	include_once $_SERVER["DOCUMENT_ROOT"].'/service/entite/news/NewsEntite.php';
	include_once $_SERVER["DOCUMENT_ROOT"].'/persistence/news/NewsDAO.php';

	class NewsService {
		
		private function NewsService() {
			//évite la construction
		}
		
		public static function createNews() {
			return new NewsEntite();
		}
		
		public static function getNewsForModification($id) {
			return NewsDAO::getNewsByID($id);
		}
		
		public static function supprimerNews($id) {
			return NewsDAO::delete($id);
		}
		
		public static function save(NewsEntite $newsEntite) {
			return NewsDAO::save($newsEntite);
		}
		
		public static function getListeNews() {
			return NewsDAO::getListeNews();
		}
	}
?>